{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "import tensorwatch as tw\n",
    "import torchvision.models"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
       " -->\n",
       "<!-- Title: Net Pages: 1 -->\n",
       "<svg width=\"152pt\" height=\"3417pt\"\n",
       " viewBox=\"0.00 0.00 152.25 3416.80\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 3412.8023)\">\n",
       "<title>Net</title>\n",
       "<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-3412.8023 148.2498,-3412.8023 148.2498,4 -4,4\"/>\n",
       "<!-- features.0 -->\n",
       "<g id=\"node1\" class=\"node\">\n",
       "<title>features.0</title>\n",
       "<path fill=\"#6495ed\" stroke=\"#000000\" d=\"M44.1249,-3340.3023C44.1249,-3340.3023 100.1249,-3340.3023 100.1249,-3340.3023 106.1249,-3340.3023 112.1249,-3346.3023 112.1249,-3352.3023 112.1249,-3352.3023 112.1249,-3396.3023 112.1249,-3396.3023 112.1249,-3402.3023 106.1249,-3408.3023 100.1249,-3408.3023 100.1249,-3408.3023 44.1249,-3408.3023 44.1249,-3408.3023 38.1249,-3408.3023 32.1249,-3402.3023 32.1249,-3396.3023 32.1249,-3396.3023 32.1249,-3352.3023 32.1249,-3352.3023 32.1249,-3346.3023 38.1249,-3340.3023 44.1249,-3340.3023\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-3393.1023\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">features.0</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-3378.1023\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">Conv</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-3363.1023\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">sh=(11, 11)</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-3348.1023\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">g=1</text>\n",
       "</g>\n",
       "<!-- 17 -->\n",
       "<g id=\"node22\" class=\"node\">\n",
       "<title>17</title>\n",
       "<ellipse fill=\"none\" stroke=\"#000000\" cx=\"72.1249\" cy=\"-3276.9322\" rx=\"67.3507\" ry=\"26.7407\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-3280.7322\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">193600</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-3265.7322\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">(1, 64, 55, 55)</text>\n",
       "</g>\n",
       "<!-- features.0&#45;&gt;17 -->\n",
       "<g id=\"edge1\" class=\"edge\">\n",
       "<title>features.0&#45;&gt;17</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-3340.247C72.1249,-3331.8254 72.1249,-3322.76 72.1249,-3314.1946\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-3314.0714 72.1249,-3304.0714 68.625,-3314.0714 75.625,-3314.0714\"/>\n",
       "</g>\n",
       "<!-- features.1 -->\n",
       "<g id=\"node2\" class=\"node\">\n",
       "<title>features.1</title>\n",
       "<path fill=\"#6495ed\" stroke=\"#000000\" d=\"M49.1249,-3175.5622C49.1249,-3175.5622 95.1249,-3175.5622 95.1249,-3175.5622 101.1249,-3175.5622 107.1249,-3181.5622 107.1249,-3187.5622 107.1249,-3187.5622 107.1249,-3201.5622 107.1249,-3201.5622 107.1249,-3207.5622 101.1249,-3213.5622 95.1249,-3213.5622 95.1249,-3213.5622 49.1249,-3213.5622 49.1249,-3213.5622 43.1249,-3213.5622 37.1249,-3207.5622 37.1249,-3201.5622 37.1249,-3201.5622 37.1249,-3187.5622 37.1249,-3187.5622 37.1249,-3181.5622 43.1249,-3175.5622 49.1249,-3175.5622\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-3198.3622\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">features.1</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-3183.3622\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">Relu</text>\n",
       "</g>\n",
       "<!-- 18 -->\n",
       "<g id=\"node23\" class=\"node\">\n",
       "<title>18</title>\n",
       "<ellipse fill=\"none\" stroke=\"#000000\" cx=\"72.1249\" cy=\"-3112.1921\" rx=\"67.3507\" ry=\"26.7407\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-3115.9921\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">193600</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-3100.9921\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">(1, 64, 55, 55)</text>\n",
       "</g>\n",
       "<!-- features.1&#45;&gt;18 -->\n",
       "<g id=\"edge3\" class=\"edge\">\n",
       "<title>features.1&#45;&gt;18</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-3175.4578C72.1249,-3167.654 72.1249,-3158.3486 72.1249,-3149.3073\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-3149.3058 72.1249,-3139.3058 68.625,-3149.3058 75.625,-3149.3058\"/>\n",
       "</g>\n",
       "<!-- features.2 -->\n",
       "<g id=\"node3\" class=\"node\">\n",
       "<title>features.2</title>\n",
       "<path fill=\"#6495ed\" stroke=\"#000000\" d=\"M49.1249,-3010.8221C49.1249,-3010.8221 95.1249,-3010.8221 95.1249,-3010.8221 101.1249,-3010.8221 107.1249,-3016.8221 107.1249,-3022.8221 107.1249,-3022.8221 107.1249,-3036.8221 107.1249,-3036.8221 107.1249,-3042.8221 101.1249,-3048.8221 95.1249,-3048.8221 95.1249,-3048.8221 49.1249,-3048.8221 49.1249,-3048.8221 43.1249,-3048.8221 37.1249,-3042.8221 37.1249,-3036.8221 37.1249,-3036.8221 37.1249,-3022.8221 37.1249,-3022.8221 37.1249,-3016.8221 43.1249,-3010.8221 49.1249,-3010.8221\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-3033.6221\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">features.2</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-3018.6221\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">MaxPool</text>\n",
       "</g>\n",
       "<!-- 19 -->\n",
       "<g id=\"node24\" class=\"node\">\n",
       "<title>19</title>\n",
       "<ellipse fill=\"none\" stroke=\"#000000\" cx=\"72.1249\" cy=\"-2947.452\" rx=\"67.3507\" ry=\"26.7407\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-2951.252\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">46656</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-2936.252\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">(1, 64, 27, 27)</text>\n",
       "</g>\n",
       "<!-- features.2&#45;&gt;19 -->\n",
       "<g id=\"edge5\" class=\"edge\">\n",
       "<title>features.2&#45;&gt;19</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-3010.7177C72.1249,-3002.9139 72.1249,-2993.6084 72.1249,-2984.5672\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-2984.5656 72.1249,-2974.5657 68.625,-2984.5657 75.625,-2984.5656\"/>\n",
       "</g>\n",
       "<!-- features.3 -->\n",
       "<g id=\"node4\" class=\"node\">\n",
       "<title>features.3</title>\n",
       "<path fill=\"#6495ed\" stroke=\"#000000\" d=\"M49.1249,-2816.082C49.1249,-2816.082 95.1249,-2816.082 95.1249,-2816.082 101.1249,-2816.082 107.1249,-2822.082 107.1249,-2828.082 107.1249,-2828.082 107.1249,-2872.082 107.1249,-2872.082 107.1249,-2878.082 101.1249,-2884.082 95.1249,-2884.082 95.1249,-2884.082 49.1249,-2884.082 49.1249,-2884.082 43.1249,-2884.082 37.1249,-2878.082 37.1249,-2872.082 37.1249,-2872.082 37.1249,-2828.082 37.1249,-2828.082 37.1249,-2822.082 43.1249,-2816.082 49.1249,-2816.082\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-2868.882\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">features.3</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-2853.882\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">Conv</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-2838.882\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">sh=(5, 5)</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-2823.882\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">g=1</text>\n",
       "</g>\n",
       "<!-- 20 -->\n",
       "<g id=\"node25\" class=\"node\">\n",
       "<title>20</title>\n",
       "<ellipse fill=\"none\" stroke=\"#000000\" cx=\"72.1249\" cy=\"-2752.7119\" rx=\"72.25\" ry=\"26.7407\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-2756.5119\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">139968</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-2741.5119\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">(1, 192, 27, 27)</text>\n",
       "</g>\n",
       "<!-- features.3&#45;&gt;20 -->\n",
       "<g id=\"edge7\" class=\"edge\">\n",
       "<title>features.3&#45;&gt;20</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-2816.0266C72.1249,-2807.6051 72.1249,-2798.5397 72.1249,-2789.9742\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-2789.851 72.1249,-2779.8511 68.625,-2789.8511 75.625,-2789.851\"/>\n",
       "</g>\n",
       "<!-- features.4 -->\n",
       "<g id=\"node5\" class=\"node\">\n",
       "<title>features.4</title>\n",
       "<path fill=\"#6495ed\" stroke=\"#000000\" d=\"M49.1249,-2651.3418C49.1249,-2651.3418 95.1249,-2651.3418 95.1249,-2651.3418 101.1249,-2651.3418 107.1249,-2657.3418 107.1249,-2663.3418 107.1249,-2663.3418 107.1249,-2677.3418 107.1249,-2677.3418 107.1249,-2683.3418 101.1249,-2689.3418 95.1249,-2689.3418 95.1249,-2689.3418 49.1249,-2689.3418 49.1249,-2689.3418 43.1249,-2689.3418 37.1249,-2683.3418 37.1249,-2677.3418 37.1249,-2677.3418 37.1249,-2663.3418 37.1249,-2663.3418 37.1249,-2657.3418 43.1249,-2651.3418 49.1249,-2651.3418\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-2674.1418\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">features.4</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-2659.1418\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">Relu</text>\n",
       "</g>\n",
       "<!-- 21 -->\n",
       "<g id=\"node26\" class=\"node\">\n",
       "<title>21</title>\n",
       "<ellipse fill=\"none\" stroke=\"#000000\" cx=\"72.1249\" cy=\"-2587.9718\" rx=\"72.25\" ry=\"26.7407\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-2591.7718\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">139968</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-2576.7718\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">(1, 192, 27, 27)</text>\n",
       "</g>\n",
       "<!-- features.4&#45;&gt;21 -->\n",
       "<g id=\"edge9\" class=\"edge\">\n",
       "<title>features.4&#45;&gt;21</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-2651.2375C72.1249,-2643.4337 72.1249,-2634.1282 72.1249,-2625.0869\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-2625.0854 72.1249,-2615.0855 68.625,-2625.0855 75.625,-2625.0854\"/>\n",
       "</g>\n",
       "<!-- features.5 -->\n",
       "<g id=\"node6\" class=\"node\">\n",
       "<title>features.5</title>\n",
       "<path fill=\"#6495ed\" stroke=\"#000000\" d=\"M49.1249,-2486.6017C49.1249,-2486.6017 95.1249,-2486.6017 95.1249,-2486.6017 101.1249,-2486.6017 107.1249,-2492.6017 107.1249,-2498.6017 107.1249,-2498.6017 107.1249,-2512.6017 107.1249,-2512.6017 107.1249,-2518.6017 101.1249,-2524.6017 95.1249,-2524.6017 95.1249,-2524.6017 49.1249,-2524.6017 49.1249,-2524.6017 43.1249,-2524.6017 37.1249,-2518.6017 37.1249,-2512.6017 37.1249,-2512.6017 37.1249,-2498.6017 37.1249,-2498.6017 37.1249,-2492.6017 43.1249,-2486.6017 49.1249,-2486.6017\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-2509.4017\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">features.5</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-2494.4017\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">MaxPool</text>\n",
       "</g>\n",
       "<!-- 22 -->\n",
       "<g id=\"node27\" class=\"node\">\n",
       "<title>22</title>\n",
       "<ellipse fill=\"none\" stroke=\"#000000\" cx=\"72.1249\" cy=\"-2423.2317\" rx=\"72.25\" ry=\"26.7407\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-2427.0317\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">32448</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-2412.0317\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">(1, 192, 13, 13)</text>\n",
       "</g>\n",
       "<!-- features.5&#45;&gt;22 -->\n",
       "<g id=\"edge11\" class=\"edge\">\n",
       "<title>features.5&#45;&gt;22</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-2486.4973C72.1249,-2478.6935 72.1249,-2469.3881 72.1249,-2460.3468\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-2460.3453 72.1249,-2450.3453 68.625,-2460.3454 75.625,-2460.3453\"/>\n",
       "</g>\n",
       "<!-- features.6 -->\n",
       "<g id=\"node7\" class=\"node\">\n",
       "<title>features.6</title>\n",
       "<path fill=\"#6495ed\" stroke=\"#000000\" d=\"M49.1249,-2291.8616C49.1249,-2291.8616 95.1249,-2291.8616 95.1249,-2291.8616 101.1249,-2291.8616 107.1249,-2297.8616 107.1249,-2303.8616 107.1249,-2303.8616 107.1249,-2347.8616 107.1249,-2347.8616 107.1249,-2353.8616 101.1249,-2359.8616 95.1249,-2359.8616 95.1249,-2359.8616 49.1249,-2359.8616 49.1249,-2359.8616 43.1249,-2359.8616 37.1249,-2353.8616 37.1249,-2347.8616 37.1249,-2347.8616 37.1249,-2303.8616 37.1249,-2303.8616 37.1249,-2297.8616 43.1249,-2291.8616 49.1249,-2291.8616\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-2344.6616\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">features.6</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-2329.6616\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">Conv</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-2314.6616\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">sh=(3, 3)</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-2299.6616\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">g=1</text>\n",
       "</g>\n",
       "<!-- 23 -->\n",
       "<g id=\"node28\" class=\"node\">\n",
       "<title>23</title>\n",
       "<ellipse fill=\"none\" stroke=\"#000000\" cx=\"72.1249\" cy=\"-2228.4916\" rx=\"72.25\" ry=\"26.7407\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-2232.2916\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">64896</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-2217.2916\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">(1, 384, 13, 13)</text>\n",
       "</g>\n",
       "<!-- features.6&#45;&gt;23 -->\n",
       "<g id=\"edge13\" class=\"edge\">\n",
       "<title>features.6&#45;&gt;23</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-2291.8063C72.1249,-2283.3847 72.1249,-2274.3193 72.1249,-2265.7539\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-2265.6307 72.1249,-2255.6307 68.625,-2265.6308 75.625,-2265.6307\"/>\n",
       "</g>\n",
       "<!-- features.7 -->\n",
       "<g id=\"node8\" class=\"node\">\n",
       "<title>features.7</title>\n",
       "<path fill=\"#6495ed\" stroke=\"#000000\" d=\"M49.1249,-2127.1215C49.1249,-2127.1215 95.1249,-2127.1215 95.1249,-2127.1215 101.1249,-2127.1215 107.1249,-2133.1215 107.1249,-2139.1215 107.1249,-2139.1215 107.1249,-2153.1215 107.1249,-2153.1215 107.1249,-2159.1215 101.1249,-2165.1215 95.1249,-2165.1215 95.1249,-2165.1215 49.1249,-2165.1215 49.1249,-2165.1215 43.1249,-2165.1215 37.1249,-2159.1215 37.1249,-2153.1215 37.1249,-2153.1215 37.1249,-2139.1215 37.1249,-2139.1215 37.1249,-2133.1215 43.1249,-2127.1215 49.1249,-2127.1215\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-2149.9215\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">features.7</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-2134.9215\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">Relu</text>\n",
       "</g>\n",
       "<!-- 24 -->\n",
       "<g id=\"node29\" class=\"node\">\n",
       "<title>24</title>\n",
       "<ellipse fill=\"none\" stroke=\"#000000\" cx=\"72.1249\" cy=\"-2063.7514\" rx=\"72.25\" ry=\"26.7407\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-2067.5514\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">64896</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-2052.5514\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">(1, 384, 13, 13)</text>\n",
       "</g>\n",
       "<!-- features.7&#45;&gt;24 -->\n",
       "<g id=\"edge15\" class=\"edge\">\n",
       "<title>features.7&#45;&gt;24</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-2127.0171C72.1249,-2119.2133 72.1249,-2109.9079 72.1249,-2100.8666\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-2100.8651 72.1249,-2090.8651 68.625,-2100.8651 75.625,-2100.8651\"/>\n",
       "</g>\n",
       "<!-- features.8 -->\n",
       "<g id=\"node9\" class=\"node\">\n",
       "<title>features.8</title>\n",
       "<path fill=\"#6495ed\" stroke=\"#000000\" d=\"M49.1249,-1932.3814C49.1249,-1932.3814 95.1249,-1932.3814 95.1249,-1932.3814 101.1249,-1932.3814 107.1249,-1938.3814 107.1249,-1944.3814 107.1249,-1944.3814 107.1249,-1988.3814 107.1249,-1988.3814 107.1249,-1994.3814 101.1249,-2000.3814 95.1249,-2000.3814 95.1249,-2000.3814 49.1249,-2000.3814 49.1249,-2000.3814 43.1249,-2000.3814 37.1249,-1994.3814 37.1249,-1988.3814 37.1249,-1988.3814 37.1249,-1944.3814 37.1249,-1944.3814 37.1249,-1938.3814 43.1249,-1932.3814 49.1249,-1932.3814\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-1985.1814\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">features.8</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-1970.1814\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">Conv</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-1955.1814\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">sh=(3, 3)</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-1940.1814\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">g=1</text>\n",
       "</g>\n",
       "<!-- 25 -->\n",
       "<g id=\"node30\" class=\"node\">\n",
       "<title>25</title>\n",
       "<ellipse fill=\"none\" stroke=\"#000000\" cx=\"72.1249\" cy=\"-1869.0113\" rx=\"72.25\" ry=\"26.7407\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-1872.8113\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">43264</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-1857.8113\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">(1, 256, 13, 13)</text>\n",
       "</g>\n",
       "<!-- features.8&#45;&gt;25 -->\n",
       "<g id=\"edge17\" class=\"edge\">\n",
       "<title>features.8&#45;&gt;25</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-1932.3261C72.1249,-1923.9045 72.1249,-1914.8391 72.1249,-1906.2736\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-1906.1505 72.1249,-1896.1505 68.625,-1906.1505 75.625,-1906.1505\"/>\n",
       "</g>\n",
       "<!-- features.9 -->\n",
       "<g id=\"node10\" class=\"node\">\n",
       "<title>features.9</title>\n",
       "<path fill=\"#6495ed\" stroke=\"#000000\" d=\"M49.1249,-1767.6413C49.1249,-1767.6413 95.1249,-1767.6413 95.1249,-1767.6413 101.1249,-1767.6413 107.1249,-1773.6413 107.1249,-1779.6413 107.1249,-1779.6413 107.1249,-1793.6413 107.1249,-1793.6413 107.1249,-1799.6413 101.1249,-1805.6413 95.1249,-1805.6413 95.1249,-1805.6413 49.1249,-1805.6413 49.1249,-1805.6413 43.1249,-1805.6413 37.1249,-1799.6413 37.1249,-1793.6413 37.1249,-1793.6413 37.1249,-1779.6413 37.1249,-1779.6413 37.1249,-1773.6413 43.1249,-1767.6413 49.1249,-1767.6413\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-1790.4413\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">features.9</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-1775.4413\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">Relu</text>\n",
       "</g>\n",
       "<!-- 26 -->\n",
       "<g id=\"node31\" class=\"node\">\n",
       "<title>26</title>\n",
       "<ellipse fill=\"none\" stroke=\"#000000\" cx=\"72.1249\" cy=\"-1704.2712\" rx=\"72.25\" ry=\"26.7407\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-1708.0712\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">43264</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-1693.0712\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">(1, 256, 13, 13)</text>\n",
       "</g>\n",
       "<!-- features.9&#45;&gt;26 -->\n",
       "<g id=\"edge19\" class=\"edge\">\n",
       "<title>features.9&#45;&gt;26</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-1767.5369C72.1249,-1759.7331 72.1249,-1750.4276 72.1249,-1741.3864\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-1741.3848 72.1249,-1731.3849 68.625,-1741.3849 75.625,-1741.3848\"/>\n",
       "</g>\n",
       "<!-- features.10 -->\n",
       "<g id=\"node11\" class=\"node\">\n",
       "<title>features.10</title>\n",
       "<path fill=\"#6495ed\" stroke=\"#000000\" d=\"M45.6249,-1572.9012C45.6249,-1572.9012 98.6249,-1572.9012 98.6249,-1572.9012 104.6249,-1572.9012 110.6249,-1578.9012 110.6249,-1584.9012 110.6249,-1584.9012 110.6249,-1628.9012 110.6249,-1628.9012 110.6249,-1634.9012 104.6249,-1640.9012 98.6249,-1640.9012 98.6249,-1640.9012 45.6249,-1640.9012 45.6249,-1640.9012 39.6249,-1640.9012 33.6249,-1634.9012 33.6249,-1628.9012 33.6249,-1628.9012 33.6249,-1584.9012 33.6249,-1584.9012 33.6249,-1578.9012 39.6249,-1572.9012 45.6249,-1572.9012\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-1625.7012\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">features.10</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-1610.7012\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">Conv</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-1595.7012\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">sh=(3, 3)</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-1580.7012\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">g=1</text>\n",
       "</g>\n",
       "<!-- 27 -->\n",
       "<g id=\"node32\" class=\"node\">\n",
       "<title>27</title>\n",
       "<ellipse fill=\"none\" stroke=\"#000000\" cx=\"72.1249\" cy=\"-1509.5311\" rx=\"72.25\" ry=\"26.7407\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-1513.3311\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">43264</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-1498.3311\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">(1, 256, 13, 13)</text>\n",
       "</g>\n",
       "<!-- features.10&#45;&gt;27 -->\n",
       "<g id=\"edge21\" class=\"edge\">\n",
       "<title>features.10&#45;&gt;27</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-1572.8458C72.1249,-1564.4243 72.1249,-1555.3589 72.1249,-1546.7934\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-1546.6702 72.1249,-1536.6703 68.625,-1546.6703 75.625,-1546.6702\"/>\n",
       "</g>\n",
       "<!-- features.11 -->\n",
       "<g id=\"node12\" class=\"node\">\n",
       "<title>features.11</title>\n",
       "<path fill=\"#6495ed\" stroke=\"#000000\" d=\"M45.6249,-1408.161C45.6249,-1408.161 98.6249,-1408.161 98.6249,-1408.161 104.6249,-1408.161 110.6249,-1414.161 110.6249,-1420.161 110.6249,-1420.161 110.6249,-1434.161 110.6249,-1434.161 110.6249,-1440.161 104.6249,-1446.161 98.6249,-1446.161 98.6249,-1446.161 45.6249,-1446.161 45.6249,-1446.161 39.6249,-1446.161 33.6249,-1440.161 33.6249,-1434.161 33.6249,-1434.161 33.6249,-1420.161 33.6249,-1420.161 33.6249,-1414.161 39.6249,-1408.161 45.6249,-1408.161\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-1430.961\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">features.11</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-1415.961\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">Relu</text>\n",
       "</g>\n",
       "<!-- 28 -->\n",
       "<g id=\"node33\" class=\"node\">\n",
       "<title>28</title>\n",
       "<ellipse fill=\"none\" stroke=\"#000000\" cx=\"72.1249\" cy=\"-1344.791\" rx=\"72.25\" ry=\"26.7407\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-1348.591\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">43264</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-1333.591\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">(1, 256, 13, 13)</text>\n",
       "</g>\n",
       "<!-- features.11&#45;&gt;28 -->\n",
       "<g id=\"edge23\" class=\"edge\">\n",
       "<title>features.11&#45;&gt;28</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-1408.0567C72.1249,-1400.2529 72.1249,-1390.9474 72.1249,-1381.9061\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-1381.9046 72.1249,-1371.9046 68.625,-1381.9047 75.625,-1381.9046\"/>\n",
       "</g>\n",
       "<!-- features.12 -->\n",
       "<g id=\"node13\" class=\"node\">\n",
       "<title>features.12</title>\n",
       "<path fill=\"#6495ed\" stroke=\"#000000\" d=\"M45.6249,-1243.4209C45.6249,-1243.4209 98.6249,-1243.4209 98.6249,-1243.4209 104.6249,-1243.4209 110.6249,-1249.4209 110.6249,-1255.4209 110.6249,-1255.4209 110.6249,-1269.4209 110.6249,-1269.4209 110.6249,-1275.4209 104.6249,-1281.4209 98.6249,-1281.4209 98.6249,-1281.4209 45.6249,-1281.4209 45.6249,-1281.4209 39.6249,-1281.4209 33.6249,-1275.4209 33.6249,-1269.4209 33.6249,-1269.4209 33.6249,-1255.4209 33.6249,-1255.4209 33.6249,-1249.4209 39.6249,-1243.4209 45.6249,-1243.4209\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-1266.2209\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">features.12</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-1251.2209\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">MaxPool</text>\n",
       "</g>\n",
       "<!-- 29 -->\n",
       "<g id=\"node34\" class=\"node\">\n",
       "<title>29</title>\n",
       "<ellipse fill=\"none\" stroke=\"#000000\" cx=\"72.1249\" cy=\"-1180.0509\" rx=\"62.8651\" ry=\"26.7407\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-1183.8509\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">9216</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-1168.8509\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">(1, 256, 6, 6)</text>\n",
       "</g>\n",
       "<!-- features.12&#45;&gt;29 -->\n",
       "<g id=\"edge25\" class=\"edge\">\n",
       "<title>features.12&#45;&gt;29</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-1243.3165C72.1249,-1235.5127 72.1249,-1226.2073 72.1249,-1217.166\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-1217.1645 72.1249,-1207.1645 68.625,-1217.1646 75.625,-1217.1645\"/>\n",
       "</g>\n",
       "<!-- avgpool -->\n",
       "<g id=\"node14\" class=\"node\">\n",
       "<title>avgpool</title>\n",
       "<path fill=\"#6495ed\" stroke=\"#000000\" d=\"M40.6249,-1078.6808C40.6249,-1078.6808 103.6249,-1078.6808 103.6249,-1078.6808 109.6249,-1078.6808 115.6249,-1084.6808 115.6249,-1090.6808 115.6249,-1090.6808 115.6249,-1104.6808 115.6249,-1104.6808 115.6249,-1110.6808 109.6249,-1116.6808 103.6249,-1116.6808 103.6249,-1116.6808 40.6249,-1116.6808 40.6249,-1116.6808 34.6249,-1116.6808 28.6249,-1110.6808 28.6249,-1104.6808 28.6249,-1104.6808 28.6249,-1090.6808 28.6249,-1090.6808 28.6249,-1084.6808 34.6249,-1078.6808 40.6249,-1078.6808\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-1101.4808\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">avgpool</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-1086.4808\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">AveragePool</text>\n",
       "</g>\n",
       "<!-- 30 -->\n",
       "<g id=\"node35\" class=\"node\">\n",
       "<title>30</title>\n",
       "<ellipse fill=\"none\" stroke=\"#000000\" cx=\"72.1249\" cy=\"-1015.3107\" rx=\"62.8651\" ry=\"26.7407\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-1019.1107\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">9216</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-1004.1107\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">(1, 256, 6, 6)</text>\n",
       "</g>\n",
       "<!-- avgpool&#45;&gt;30 -->\n",
       "<g id=\"edge27\" class=\"edge\">\n",
       "<title>avgpool&#45;&gt;30</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-1078.5764C72.1249,-1070.7726 72.1249,-1061.4672 72.1249,-1052.4259\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-1052.4244 72.1249,-1042.4244 68.625,-1052.4244 75.625,-1052.4244\"/>\n",
       "</g>\n",
       "<!-- top_level_op -->\n",
       "<g id=\"node15\" class=\"node\">\n",
       "<title>top_level_op</title>\n",
       "<path fill=\"#6495ed\" stroke=\"#000000\" d=\"M40.6249,-913.9407C40.6249,-913.9407 103.6249,-913.9407 103.6249,-913.9407 109.6249,-913.9407 115.6249,-919.9407 115.6249,-925.9407 115.6249,-925.9407 115.6249,-939.9407 115.6249,-939.9407 115.6249,-945.9407 109.6249,-951.9407 103.6249,-951.9407 103.6249,-951.9407 40.6249,-951.9407 40.6249,-951.9407 34.6249,-951.9407 28.6249,-945.9407 28.6249,-939.9407 28.6249,-939.9407 28.6249,-925.9407 28.6249,-925.9407 28.6249,-919.9407 34.6249,-913.9407 40.6249,-913.9407\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-936.7407\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">top_level_op</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-921.7407\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">Flatten</text>\n",
       "</g>\n",
       "<!-- 31 -->\n",
       "<g id=\"node36\" class=\"node\">\n",
       "<title>31</title>\n",
       "<ellipse fill=\"none\" stroke=\"#000000\" cx=\"72.1249\" cy=\"-850.5706\" rx=\"47.2526\" ry=\"26.7407\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-854.3706\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">9216</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-839.3706\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">(1, 9216)</text>\n",
       "</g>\n",
       "<!-- top_level_op&#45;&gt;31 -->\n",
       "<g id=\"edge29\" class=\"edge\">\n",
       "<title>top_level_op&#45;&gt;31</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-913.8363C72.1249,-906.0325 72.1249,-896.7271 72.1249,-887.6858\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-887.6843 72.1249,-877.6843 68.625,-887.6843 75.625,-887.6843\"/>\n",
       "</g>\n",
       "<!-- classifier.1 -->\n",
       "<g id=\"node16\" class=\"node\">\n",
       "<title>classifier.1</title>\n",
       "<path fill=\"#6495ed\" stroke=\"#000000\" d=\"M46.1249,-749.2006C46.1249,-749.2006 98.1249,-749.2006 98.1249,-749.2006 104.1249,-749.2006 110.1249,-755.2006 110.1249,-761.2006 110.1249,-761.2006 110.1249,-775.2006 110.1249,-775.2006 110.1249,-781.2006 104.1249,-787.2006 98.1249,-787.2006 98.1249,-787.2006 46.1249,-787.2006 46.1249,-787.2006 40.1249,-787.2006 34.1249,-781.2006 34.1249,-775.2006 34.1249,-775.2006 34.1249,-761.2006 34.1249,-761.2006 34.1249,-755.2006 40.1249,-749.2006 46.1249,-749.2006\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-772.0006\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">classifier.1</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-757.0006\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">Gemm</text>\n",
       "</g>\n",
       "<!-- 32 -->\n",
       "<g id=\"node37\" class=\"node\">\n",
       "<title>32</title>\n",
       "<ellipse fill=\"none\" stroke=\"#000000\" cx=\"72.1249\" cy=\"-685.8305\" rx=\"47.2526\" ry=\"26.7407\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-689.6305\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">4096</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-674.6305\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">(1, 4096)</text>\n",
       "</g>\n",
       "<!-- classifier.1&#45;&gt;32 -->\n",
       "<g id=\"edge31\" class=\"edge\">\n",
       "<title>classifier.1&#45;&gt;32</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-749.0962C72.1249,-741.2924 72.1249,-731.9869 72.1249,-722.9457\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-722.9441 72.1249,-712.9442 68.625,-722.9442 75.625,-722.9441\"/>\n",
       "</g>\n",
       "<!-- classifier.2 -->\n",
       "<g id=\"node17\" class=\"node\">\n",
       "<title>classifier.2</title>\n",
       "<path fill=\"#6495ed\" stroke=\"#000000\" d=\"M46.1249,-584.4605C46.1249,-584.4605 98.1249,-584.4605 98.1249,-584.4605 104.1249,-584.4605 110.1249,-590.4605 110.1249,-596.4605 110.1249,-596.4605 110.1249,-610.4605 110.1249,-610.4605 110.1249,-616.4605 104.1249,-622.4605 98.1249,-622.4605 98.1249,-622.4605 46.1249,-622.4605 46.1249,-622.4605 40.1249,-622.4605 34.1249,-616.4605 34.1249,-610.4605 34.1249,-610.4605 34.1249,-596.4605 34.1249,-596.4605 34.1249,-590.4605 40.1249,-584.4605 46.1249,-584.4605\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-607.2605\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">classifier.2</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-592.2605\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">Relu</text>\n",
       "</g>\n",
       "<!-- 33 -->\n",
       "<g id=\"node38\" class=\"node\">\n",
       "<title>33</title>\n",
       "<ellipse fill=\"none\" stroke=\"#000000\" cx=\"72.1249\" cy=\"-521.0904\" rx=\"47.2526\" ry=\"26.7407\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-524.8904\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">4096</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-509.8904\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">(1, 4096)</text>\n",
       "</g>\n",
       "<!-- classifier.2&#45;&gt;33 -->\n",
       "<g id=\"edge33\" class=\"edge\">\n",
       "<title>classifier.2&#45;&gt;33</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-584.3561C72.1249,-576.5523 72.1249,-567.2468 72.1249,-558.2056\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-558.204 72.1249,-548.2041 68.625,-558.2041 75.625,-558.204\"/>\n",
       "</g>\n",
       "<!-- classifier.4 -->\n",
       "<g id=\"node18\" class=\"node\">\n",
       "<title>classifier.4</title>\n",
       "<path fill=\"#6495ed\" stroke=\"#000000\" d=\"M46.1249,-419.7203C46.1249,-419.7203 98.1249,-419.7203 98.1249,-419.7203 104.1249,-419.7203 110.1249,-425.7203 110.1249,-431.7203 110.1249,-431.7203 110.1249,-445.7203 110.1249,-445.7203 110.1249,-451.7203 104.1249,-457.7203 98.1249,-457.7203 98.1249,-457.7203 46.1249,-457.7203 46.1249,-457.7203 40.1249,-457.7203 34.1249,-451.7203 34.1249,-445.7203 34.1249,-445.7203 34.1249,-431.7203 34.1249,-431.7203 34.1249,-425.7203 40.1249,-419.7203 46.1249,-419.7203\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-442.5203\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">classifier.4</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-427.5203\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">Gemm</text>\n",
       "</g>\n",
       "<!-- 34 -->\n",
       "<g id=\"node39\" class=\"node\">\n",
       "<title>34</title>\n",
       "<ellipse fill=\"none\" stroke=\"#000000\" cx=\"72.1249\" cy=\"-356.3503\" rx=\"47.2526\" ry=\"26.7407\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-360.1503\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">4096</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-345.1503\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">(1, 4096)</text>\n",
       "</g>\n",
       "<!-- classifier.4&#45;&gt;34 -->\n",
       "<g id=\"edge35\" class=\"edge\">\n",
       "<title>classifier.4&#45;&gt;34</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-419.616C72.1249,-411.8122 72.1249,-402.5067 72.1249,-393.4654\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-393.4639 72.1249,-383.464 68.625,-393.464 75.625,-393.4639\"/>\n",
       "</g>\n",
       "<!-- classifier.5 -->\n",
       "<g id=\"node19\" class=\"node\">\n",
       "<title>classifier.5</title>\n",
       "<path fill=\"#6495ed\" stroke=\"#000000\" d=\"M46.1249,-254.9802C46.1249,-254.9802 98.1249,-254.9802 98.1249,-254.9802 104.1249,-254.9802 110.1249,-260.9802 110.1249,-266.9802 110.1249,-266.9802 110.1249,-280.9802 110.1249,-280.9802 110.1249,-286.9802 104.1249,-292.9802 98.1249,-292.9802 98.1249,-292.9802 46.1249,-292.9802 46.1249,-292.9802 40.1249,-292.9802 34.1249,-286.9802 34.1249,-280.9802 34.1249,-280.9802 34.1249,-266.9802 34.1249,-266.9802 34.1249,-260.9802 40.1249,-254.9802 46.1249,-254.9802\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-277.7802\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">classifier.5</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-262.7802\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">Relu</text>\n",
       "</g>\n",
       "<!-- 35 -->\n",
       "<g id=\"node40\" class=\"node\">\n",
       "<title>35</title>\n",
       "<ellipse fill=\"none\" stroke=\"#000000\" cx=\"72.1249\" cy=\"-191.6102\" rx=\"47.2526\" ry=\"26.7407\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-195.4102\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">4096</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-180.4102\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">(1, 4096)</text>\n",
       "</g>\n",
       "<!-- classifier.5&#45;&gt;35 -->\n",
       "<g id=\"edge37\" class=\"edge\">\n",
       "<title>classifier.5&#45;&gt;35</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-254.8758C72.1249,-247.072 72.1249,-237.7666 72.1249,-228.7253\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-228.7238 72.1249,-218.7238 68.625,-228.7239 75.625,-228.7238\"/>\n",
       "</g>\n",
       "<!-- classifier.6 -->\n",
       "<g id=\"node20\" class=\"node\">\n",
       "<title>classifier.6</title>\n",
       "<path fill=\"#6495ed\" stroke=\"#000000\" d=\"M46.1249,-90.2401C46.1249,-90.2401 98.1249,-90.2401 98.1249,-90.2401 104.1249,-90.2401 110.1249,-96.2401 110.1249,-102.2401 110.1249,-102.2401 110.1249,-116.2401 110.1249,-116.2401 110.1249,-122.2401 104.1249,-128.2401 98.1249,-128.2401 98.1249,-128.2401 46.1249,-128.2401 46.1249,-128.2401 40.1249,-128.2401 34.1249,-122.2401 34.1249,-116.2401 34.1249,-116.2401 34.1249,-102.2401 34.1249,-102.2401 34.1249,-96.2401 40.1249,-90.2401 46.1249,-90.2401\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-113.0401\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">classifier.6</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-98.0401\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">Gemm</text>\n",
       "</g>\n",
       "<!-- 36 -->\n",
       "<g id=\"node21\" class=\"node\">\n",
       "<title>36</title>\n",
       "<ellipse fill=\"none\" stroke=\"#000000\" cx=\"72.1249\" cy=\"-26.8701\" rx=\"47.2526\" ry=\"26.7407\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-30.6701\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">1000</text>\n",
       "<text text-anchor=\"middle\" x=\"72.1249\" y=\"-15.6701\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">(1, 1000)</text>\n",
       "</g>\n",
       "<!-- classifier.6&#45;&gt;36 -->\n",
       "<g id=\"edge39\" class=\"edge\">\n",
       "<title>classifier.6&#45;&gt;36</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-90.1357C72.1249,-82.3319 72.1249,-73.0265 72.1249,-63.9852\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-63.9837 72.1249,-53.9837 68.625,-63.9838 75.625,-63.9837\"/>\n",
       "</g>\n",
       "<!-- 17&#45;&gt;features.1 -->\n",
       "<g id=\"edge2\" class=\"edge\">\n",
       "<title>17&#45;&gt;features.1</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-3249.9612C72.1249,-3241.6477 72.1249,-3232.4535 72.1249,-3223.9838\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-3223.7638 72.1249,-3213.7639 68.625,-3223.7639 75.625,-3223.7638\"/>\n",
       "</g>\n",
       "<!-- 18&#45;&gt;features.2 -->\n",
       "<g id=\"edge4\" class=\"edge\">\n",
       "<title>18&#45;&gt;features.2</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-3085.2211C72.1249,-3076.9076 72.1249,-3067.7134 72.1249,-3059.2437\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-3059.0237 72.1249,-3049.0237 68.625,-3059.0238 75.625,-3059.0237\"/>\n",
       "</g>\n",
       "<!-- 19&#45;&gt;features.3 -->\n",
       "<g id=\"edge6\" class=\"edge\">\n",
       "<title>19&#45;&gt;features.3</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-2920.329C72.1249,-2912.3209 72.1249,-2903.3374 72.1249,-2894.5394\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-2894.366 72.1249,-2884.3661 68.625,-2894.3661 75.625,-2894.366\"/>\n",
       "</g>\n",
       "<!-- 20&#45;&gt;features.4 -->\n",
       "<g id=\"edge8\" class=\"edge\">\n",
       "<title>20&#45;&gt;features.4</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-2725.7409C72.1249,-2717.4274 72.1249,-2708.2332 72.1249,-2699.7635\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-2699.5435 72.1249,-2689.5435 68.625,-2699.5436 75.625,-2699.5435\"/>\n",
       "</g>\n",
       "<!-- 21&#45;&gt;features.5 -->\n",
       "<g id=\"edge10\" class=\"edge\">\n",
       "<title>21&#45;&gt;features.5</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-2561.0008C72.1249,-2552.6873 72.1249,-2543.4931 72.1249,-2535.0234\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-2534.8034 72.1249,-2524.8034 68.625,-2534.8034 75.625,-2534.8034\"/>\n",
       "</g>\n",
       "<!-- 22&#45;&gt;features.6 -->\n",
       "<g id=\"edge12\" class=\"edge\">\n",
       "<title>22&#45;&gt;features.6</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-2396.1087C72.1249,-2388.1005 72.1249,-2379.117 72.1249,-2370.319\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-2370.1457 72.1249,-2360.1457 68.625,-2370.1458 75.625,-2370.1457\"/>\n",
       "</g>\n",
       "<!-- 23&#45;&gt;features.7 -->\n",
       "<g id=\"edge14\" class=\"edge\">\n",
       "<title>23&#45;&gt;features.7</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-2201.5205C72.1249,-2193.207 72.1249,-2184.0128 72.1249,-2175.5431\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-2175.3231 72.1249,-2165.3232 68.625,-2175.3232 75.625,-2175.3231\"/>\n",
       "</g>\n",
       "<!-- 24&#45;&gt;features.8 -->\n",
       "<g id=\"edge16\" class=\"edge\">\n",
       "<title>24&#45;&gt;features.8</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-2036.6285C72.1249,-2028.6203 72.1249,-2019.6368 72.1249,-2010.8388\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-2010.6655 72.1249,-2000.6655 68.625,-2010.6655 75.625,-2010.6655\"/>\n",
       "</g>\n",
       "<!-- 25&#45;&gt;features.9 -->\n",
       "<g id=\"edge18\" class=\"edge\">\n",
       "<title>25&#45;&gt;features.9</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-1842.0403C72.1249,-1833.7268 72.1249,-1824.5326 72.1249,-1816.0629\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-1815.8429 72.1249,-1805.8429 68.625,-1815.843 75.625,-1815.8429\"/>\n",
       "</g>\n",
       "<!-- 26&#45;&gt;features.10 -->\n",
       "<g id=\"edge20\" class=\"edge\">\n",
       "<title>26&#45;&gt;features.10</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-1677.1482C72.1249,-1669.1401 72.1249,-1660.1566 72.1249,-1651.3586\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-1651.1852 72.1249,-1641.1853 68.625,-1651.1853 75.625,-1651.1852\"/>\n",
       "</g>\n",
       "<!-- 27&#45;&gt;features.11 -->\n",
       "<g id=\"edge22\" class=\"edge\">\n",
       "<title>27&#45;&gt;features.11</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-1482.5601C72.1249,-1474.2466 72.1249,-1465.0524 72.1249,-1456.5827\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-1456.3627 72.1249,-1446.3627 68.625,-1456.3627 75.625,-1456.3627\"/>\n",
       "</g>\n",
       "<!-- 28&#45;&gt;features.12 -->\n",
       "<g id=\"edge24\" class=\"edge\">\n",
       "<title>28&#45;&gt;features.12</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-1317.8199C72.1249,-1309.5065 72.1249,-1300.3123 72.1249,-1291.8426\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-1291.6226 72.1249,-1281.6226 68.625,-1291.6226 75.625,-1291.6226\"/>\n",
       "</g>\n",
       "<!-- 29&#45;&gt;avgpool -->\n",
       "<g id=\"edge26\" class=\"edge\">\n",
       "<title>29&#45;&gt;avgpool</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-1153.0798C72.1249,-1144.7663 72.1249,-1135.5721 72.1249,-1127.1024\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-1126.8824 72.1249,-1116.8825 68.625,-1126.8825 75.625,-1126.8824\"/>\n",
       "</g>\n",
       "<!-- 30&#45;&gt;top_level_op -->\n",
       "<g id=\"edge28\" class=\"edge\">\n",
       "<title>30&#45;&gt;top_level_op</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-988.3397C72.1249,-980.0262 72.1249,-970.832 72.1249,-962.3623\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-962.1423 72.1249,-952.1424 68.625,-962.1424 75.625,-962.1423\"/>\n",
       "</g>\n",
       "<!-- 31&#45;&gt;classifier.1 -->\n",
       "<g id=\"edge30\" class=\"edge\">\n",
       "<title>31&#45;&gt;classifier.1</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-823.5996C72.1249,-815.2861 72.1249,-806.0919 72.1249,-797.6222\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-797.4022 72.1249,-787.4022 68.625,-797.4023 75.625,-797.4022\"/>\n",
       "</g>\n",
       "<!-- 32&#45;&gt;classifier.2 -->\n",
       "<g id=\"edge32\" class=\"edge\">\n",
       "<title>32&#45;&gt;classifier.2</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-658.8595C72.1249,-650.546 72.1249,-641.3518 72.1249,-632.8821\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-632.6621 72.1249,-622.6621 68.625,-632.6622 75.625,-632.6621\"/>\n",
       "</g>\n",
       "<!-- 33&#45;&gt;classifier.4 -->\n",
       "<g id=\"edge34\" class=\"edge\">\n",
       "<title>33&#45;&gt;classifier.4</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-494.1194C72.1249,-485.8059 72.1249,-476.6117 72.1249,-468.142\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-467.922 72.1249,-457.922 68.625,-467.9221 75.625,-467.922\"/>\n",
       "</g>\n",
       "<!-- 34&#45;&gt;classifier.5 -->\n",
       "<g id=\"edge36\" class=\"edge\">\n",
       "<title>34&#45;&gt;classifier.5</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-329.3793C72.1249,-321.0658 72.1249,-311.8716 72.1249,-303.4019\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-303.1819 72.1249,-293.1819 68.625,-303.1819 75.625,-303.1819\"/>\n",
       "</g>\n",
       "<!-- 35&#45;&gt;classifier.6 -->\n",
       "<g id=\"edge38\" class=\"edge\">\n",
       "<title>35&#45;&gt;classifier.6</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M72.1249,-164.6391C72.1249,-156.3257 72.1249,-147.1314 72.1249,-138.6618\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"75.625,-138.4418 72.1249,-128.4418 68.625,-138.4418 75.625,-138.4418\"/>\n",
       "</g>\n",
       "</g>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<tensorwatch.model_graph.hiddenlayer.pytorch_draw_model.DotWrapper at 0x7f8468026e10>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "alexnet_model = torchvision.models.alexnet()\n",
    "tw.draw_model(alexnet_model, [1, 3, 224, 224])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[MAdd]: AdaptiveAvgPool2d is not supported!\n",
      "[Memory]: AdaptiveAvgPool2d is not supported!\n",
      "[MAdd]: Dropout is not supported!\n",
      "[Flops]: Dropout is not supported!\n",
      "[Memory]: Dropout is not supported!\n",
      "[MAdd]: Dropout is not supported!\n",
      "[Flops]: Dropout is not supported!\n",
      "[Memory]: Dropout is not supported!\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>module name</th>\n",
       "      <th>input shape</th>\n",
       "      <th>output_shape</th>\n",
       "      <th>parameters</th>\n",
       "      <th>infer memory(MB)</th>\n",
       "      <th>MAdd</th>\n",
       "      <th>Flops</th>\n",
       "      <th>MemRead(B)</th>\n",
       "      <th>MemWrite(B)</th>\n",
       "      <th>duration</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>features.0</td>\n",
       "      <td>[3, 224, 224]</td>\n",
       "      <td>[64, 55, 55]</td>\n",
       "      <td>23,296</td>\n",
       "      <td>0.738525390625</td>\n",
       "      <td>140,553,600</td>\n",
       "      <td>70,470,400</td>\n",
       "      <td>695,296</td>\n",
       "      <td>774,400</td>\n",
       "      <td>0.002673</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>features.1</td>\n",
       "      <td>[64, 55, 55]</td>\n",
       "      <td>[64, 55, 55]</td>\n",
       "      <td>0</td>\n",
       "      <td>0.738525390625</td>\n",
       "      <td>193,600</td>\n",
       "      <td>193,600</td>\n",
       "      <td>774,400</td>\n",
       "      <td>774,400</td>\n",
       "      <td>0.000104</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>features.2</td>\n",
       "      <td>[64, 55, 55]</td>\n",
       "      <td>[64, 27, 27]</td>\n",
       "      <td>0</td>\n",
       "      <td>0.177978515625</td>\n",
       "      <td>373,248</td>\n",
       "      <td>419,904</td>\n",
       "      <td>774,400</td>\n",
       "      <td>186,624</td>\n",
       "      <td>0.002643</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>features.3</td>\n",
       "      <td>[64, 27, 27]</td>\n",
       "      <td>[192, 27, 27]</td>\n",
       "      <td>307,392</td>\n",
       "      <td>0.533935546875</td>\n",
       "      <td>447,897,600</td>\n",
       "      <td>224,088,768</td>\n",
       "      <td>1,416,192</td>\n",
       "      <td>559,872</td>\n",
       "      <td>0.002892</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>features.4</td>\n",
       "      <td>[192, 27, 27]</td>\n",
       "      <td>[192, 27, 27]</td>\n",
       "      <td>0</td>\n",
       "      <td>0.533935546875</td>\n",
       "      <td>139,968</td>\n",
       "      <td>139,968</td>\n",
       "      <td>559,872</td>\n",
       "      <td>559,872</td>\n",
       "      <td>0.000063</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>features.5</td>\n",
       "      <td>[192, 27, 27]</td>\n",
       "      <td>[192, 13, 13]</td>\n",
       "      <td>0</td>\n",
       "      <td>0.123779296875</td>\n",
       "      <td>259,584</td>\n",
       "      <td>292,032</td>\n",
       "      <td>559,872</td>\n",
       "      <td>129,792</td>\n",
       "      <td>0.001872</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>features.6</td>\n",
       "      <td>[192, 13, 13]</td>\n",
       "      <td>[384, 13, 13]</td>\n",
       "      <td>663,936</td>\n",
       "      <td>0.24755859375</td>\n",
       "      <td>224,280,576</td>\n",
       "      <td>112,205,184</td>\n",
       "      <td>2,785,536</td>\n",
       "      <td>259,584</td>\n",
       "      <td>0.001139</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>features.7</td>\n",
       "      <td>[384, 13, 13]</td>\n",
       "      <td>[384, 13, 13]</td>\n",
       "      <td>0</td>\n",
       "      <td>0.24755859375</td>\n",
       "      <td>64,896</td>\n",
       "      <td>64,896</td>\n",
       "      <td>259,584</td>\n",
       "      <td>259,584</td>\n",
       "      <td>0.000045</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>features.8</td>\n",
       "      <td>[384, 13, 13]</td>\n",
       "      <td>[256, 13, 13]</td>\n",
       "      <td>884,992</td>\n",
       "      <td>0.1650390625</td>\n",
       "      <td>299,040,768</td>\n",
       "      <td>149,563,648</td>\n",
       "      <td>3,799,552</td>\n",
       "      <td>173,056</td>\n",
       "      <td>0.001619</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>features.9</td>\n",
       "      <td>[256, 13, 13]</td>\n",
       "      <td>[256, 13, 13]</td>\n",
       "      <td>0</td>\n",
       "      <td>0.1650390625</td>\n",
       "      <td>43,264</td>\n",
       "      <td>43,264</td>\n",
       "      <td>173,056</td>\n",
       "      <td>173,056</td>\n",
       "      <td>0.000046</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>features.10</td>\n",
       "      <td>[256, 13, 13]</td>\n",
       "      <td>[256, 13, 13]</td>\n",
       "      <td>590,080</td>\n",
       "      <td>0.1650390625</td>\n",
       "      <td>199,360,512</td>\n",
       "      <td>99,723,520</td>\n",
       "      <td>2,533,376</td>\n",
       "      <td>173,056</td>\n",
       "      <td>0.001149</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>features.11</td>\n",
       "      <td>[256, 13, 13]</td>\n",
       "      <td>[256, 13, 13]</td>\n",
       "      <td>0</td>\n",
       "      <td>0.1650390625</td>\n",
       "      <td>43,264</td>\n",
       "      <td>43,264</td>\n",
       "      <td>173,056</td>\n",
       "      <td>173,056</td>\n",
       "      <td>0.000047</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>features.12</td>\n",
       "      <td>[256, 13, 13]</td>\n",
       "      <td>[256, 6, 6]</td>\n",
       "      <td>0</td>\n",
       "      <td>0.03515625</td>\n",
       "      <td>73,728</td>\n",
       "      <td>82,944</td>\n",
       "      <td>173,056</td>\n",
       "      <td>36,864</td>\n",
       "      <td>0.000592</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>avgpool</td>\n",
       "      <td>[256, 6, 6]</td>\n",
       "      <td>[256, 6, 6]</td>\n",
       "      <td>0</td>\n",
       "      <td>0.03515625</td>\n",
       "      <td>0</td>\n",
       "      <td>36,864</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000125</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>classifier.0</td>\n",
       "      <td>[9216]</td>\n",
       "      <td>[9216]</td>\n",
       "      <td>0</td>\n",
       "      <td>0.03515625</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000295</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>classifier.1</td>\n",
       "      <td>[9216]</td>\n",
       "      <td>[4096]</td>\n",
       "      <td>37,752,832</td>\n",
       "      <td>0.015625</td>\n",
       "      <td>75,493,376</td>\n",
       "      <td>37,748,736</td>\n",
       "      <td>151,048,192</td>\n",
       "      <td>16,384</td>\n",
       "      <td>0.006485</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>classifier.2</td>\n",
       "      <td>[4096]</td>\n",
       "      <td>[4096]</td>\n",
       "      <td>0</td>\n",
       "      <td>0.015625</td>\n",
       "      <td>4,096</td>\n",
       "      <td>4,096</td>\n",
       "      <td>16,384</td>\n",
       "      <td>16,384</td>\n",
       "      <td>0.000075</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>classifier.3</td>\n",
       "      <td>[4096]</td>\n",
       "      <td>[4096]</td>\n",
       "      <td>0</td>\n",
       "      <td>0.015625</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000033</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>classifier.4</td>\n",
       "      <td>[4096]</td>\n",
       "      <td>[4096]</td>\n",
       "      <td>16,781,312</td>\n",
       "      <td>0.015625</td>\n",
       "      <td>33,550,336</td>\n",
       "      <td>16,777,216</td>\n",
       "      <td>67,141,632</td>\n",
       "      <td>16,384</td>\n",
       "      <td>0.003160</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>classifier.5</td>\n",
       "      <td>[4096]</td>\n",
       "      <td>[4096]</td>\n",
       "      <td>0</td>\n",
       "      <td>0.015625</td>\n",
       "      <td>4,096</td>\n",
       "      <td>4,096</td>\n",
       "      <td>16,384</td>\n",
       "      <td>16,384</td>\n",
       "      <td>0.000072</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>classifier.6</td>\n",
       "      <td>[4096]</td>\n",
       "      <td>[1000]</td>\n",
       "      <td>4,097,000</td>\n",
       "      <td>0.003814697265625</td>\n",
       "      <td>8,191,000</td>\n",
       "      <td>4,096,000</td>\n",
       "      <td>16,404,384</td>\n",
       "      <td>4,000</td>\n",
       "      <td>0.000786</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>Model</td>\n",
       "      <td>[3, 224, 224]</td>\n",
       "      <td>[1000]</td>\n",
       "      <td>61,100,840</td>\n",
       "      <td>4.189361572265625</td>\n",
       "      <td>1,429,567,512</td>\n",
       "      <td>715,998,400</td>\n",
       "      <td>249,304,224</td>\n",
       "      <td>4,302,752</td>\n",
       "      <td>0.025915</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     module name    input shape   output_shape  parameters   infer memory(MB)           MAdd        Flops   MemRead(B) MemWrite(B)  duration\n",
       "0     features.0  [3, 224, 224]   [64, 55, 55]      23,296     0.738525390625    140,553,600   70,470,400      695,296     774,400  0.002673\n",
       "1     features.1   [64, 55, 55]   [64, 55, 55]           0     0.738525390625        193,600      193,600      774,400     774,400  0.000104\n",
       "2     features.2   [64, 55, 55]   [64, 27, 27]           0     0.177978515625        373,248      419,904      774,400     186,624  0.002643\n",
       "3     features.3   [64, 27, 27]  [192, 27, 27]     307,392     0.533935546875    447,897,600  224,088,768    1,416,192     559,872  0.002892\n",
       "4     features.4  [192, 27, 27]  [192, 27, 27]           0     0.533935546875        139,968      139,968      559,872     559,872  0.000063\n",
       "5     features.5  [192, 27, 27]  [192, 13, 13]           0     0.123779296875        259,584      292,032      559,872     129,792  0.001872\n",
       "6     features.6  [192, 13, 13]  [384, 13, 13]     663,936      0.24755859375    224,280,576  112,205,184    2,785,536     259,584  0.001139\n",
       "7     features.7  [384, 13, 13]  [384, 13, 13]           0      0.24755859375         64,896       64,896      259,584     259,584  0.000045\n",
       "8     features.8  [384, 13, 13]  [256, 13, 13]     884,992       0.1650390625    299,040,768  149,563,648    3,799,552     173,056  0.001619\n",
       "9     features.9  [256, 13, 13]  [256, 13, 13]           0       0.1650390625         43,264       43,264      173,056     173,056  0.000046\n",
       "10   features.10  [256, 13, 13]  [256, 13, 13]     590,080       0.1650390625    199,360,512   99,723,520    2,533,376     173,056  0.001149\n",
       "11   features.11  [256, 13, 13]  [256, 13, 13]           0       0.1650390625         43,264       43,264      173,056     173,056  0.000047\n",
       "12   features.12  [256, 13, 13]    [256, 6, 6]           0         0.03515625         73,728       82,944      173,056      36,864  0.000592\n",
       "13       avgpool    [256, 6, 6]    [256, 6, 6]           0         0.03515625              0       36,864            0           0  0.000125\n",
       "14  classifier.0         [9216]         [9216]           0         0.03515625              0            0            0           0  0.000295\n",
       "15  classifier.1         [9216]         [4096]  37,752,832           0.015625     75,493,376   37,748,736  151,048,192      16,384  0.006485\n",
       "16  classifier.2         [4096]         [4096]           0           0.015625          4,096        4,096       16,384      16,384  0.000075\n",
       "17  classifier.3         [4096]         [4096]           0           0.015625              0            0            0           0  0.000033\n",
       "18  classifier.4         [4096]         [4096]  16,781,312           0.015625     33,550,336   16,777,216   67,141,632      16,384  0.003160\n",
       "19  classifier.5         [4096]         [4096]           0           0.015625          4,096        4,096       16,384      16,384  0.000072\n",
       "20  classifier.6         [4096]         [1000]   4,097,000  0.003814697265625      8,191,000    4,096,000   16,404,384       4,000  0.000786\n",
       "21         Model  [3, 224, 224]         [1000]  61,100,840  4.189361572265625  1,429,567,512  715,998,400  249,304,224   4,302,752  0.025915"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tw.model_stats(alexnet_model, [1, 3, 224, 224])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
